<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<input id="yuefen" placeholder="查询月份" />
<input type="button" value="查询" onclick="chaxun()" />
<input placeholder="天数" id="number" />
<script>
     function chaxun(){
         if(yuefen.value == "12"||yuefen.value == "10"||yuefen.value == "8"||yuefen.value == "6"||yuefen.value == "4"||yuefen.value == "1"){
             number.value="31";
         }else{
             if(yuefen.value == "11"||yuefen.value == "9"||yuefen.value == "7"||yuefen.value == "5"||yuefen.value == "3"){
                number.value= "30";
             }else{
                 if(yuefen.value == "2"){
                     number.value="28";
                 }
             }
         }
     }
</script>








</body>
</html>